package com.mvd.app.activity;

import android.os.Bundle;

import com.mvd.app.R;

import butterknife.ButterKnife;

public class QRScanActivity extends BaseActivity {
//    @BindView(R.id.barcode_scanner)
//    CompoundBarcodeView barcodeScanner;
//    @BindView(R.id.dbv_custom)
//    DecoratedBarcodeView dbvCustom;
//    //    private CompoundBarcodeView barcodeScannerView;
//    private CaptureManager captureManager;
    private boolean isLightOn = false;
//    @Override
//    public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
//        super.onSaveInstanceState(outState, outPersistentState);
//        captureManager.onSaveInstanceState(outState);
//    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_qrscan);
        ButterKnife.bind(this);
//        barcodeScannerView = findViewById(R.id.barcode_scanner);
//        barcodeScanner.decodeContinuous(callback);
//
//        captureManager = new CaptureManager(this, dbvCustom);
//        captureManager.initializeFromIntent(getIntent(), savedInstanceState);
//        captureManager.decode();
    }

//    private BarcodeCallback callback = new BarcodeCallback() {
//        @Override
//        public void barcodeResult(BarcodeResult result) {
//            if (result.getText() != null) {
//                // 处理扫描结果
//                UtilsLog.e("扫描结果：" + result.getText());
//                Toast.makeText(QRScanActivity.this, "扫描结果：" + result.getText(), Toast.LENGTH_SHORT).show();
//            }
//        }
//
//        @Override
//        public void possibleResultPoints(List<ResultPoint> resultPoints) {
//        }
//    };
//    @Override
//    protected void onPause() {
//        super.onPause();
//        captureManager.onPause();
//    }
//
//    @Override
//    protected void onResume() {
//        super.onResume();
//        captureManager.onResume();
//    }
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        captureManager.onDestroy();
//    }
//    @Override
//    protected void onResume() {
//        super.onResume();
//        barcodeScanner.resume();
//        dbvCustom.resume();
//    }
//
//    @Override
//    protected void onPause() {
//        super.onPause();
//        barcodeScanner.pause();
//        dbvCustom.pause();
//    }
}
